package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdShoppingcartMapper;
import com.diankangwo.factory.entity.TdShoppingcart;
import com.diankangwo.factory.service.TdShoppingcartServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("TdShoppingcartServices")
public class TdShoppingcartServicesImpl implements TdShoppingcartServices{

    @Autowired
    private TdShoppingcartMapper tdShoppingcartMapper;

    @Override
    @Transactional
    public int deleteByPrimaryKey(Integer id) {
        return tdShoppingcartMapper.deleteByPrimaryKey(id);
    }

    @Override
    @Transactional
    public int insert(TdShoppingcart record) {
        return tdShoppingcartMapper.insert(record);
    }

    @Override
    @Transactional
    public int insertSelective(TdShoppingcart record) {
        return tdShoppingcartMapper.insertSelective(record);
    }

    @Override
    public TdShoppingcart selectByPrimaryKey(Integer id) {
        return tdShoppingcartMapper.selectByPrimaryKey(id);
    }

    @Override
    @Transactional
    public int updateByPrimaryKeySelective(TdShoppingcart record) {
        return tdShoppingcartMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(TdShoppingcart record) {
        return tdShoppingcartMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TdShoppingcart> selectByCommId(int id) {
        return tdShoppingcartMapper.selectByCommId(id);
    }
}
